#ifndef SIGALRM_HANDLER_H_
#define SIGALRM_HANDLER_H_

#include <signal.h>
#include <assert.h>
#include "EventHandler.h"

class SIGALRM_Handler: public EventHandler {

private:
	sig_atomic_t expiro;

public:

	SIGALRM_Handler() {
		this->expiro = 0;
	}

	virtual int handleSignal(int signum) {
		assert( signum == SIGALRM);
		this->expiro = 1;
		return 0;
	}

	sig_atomic_t noExpiro() {
		return this->expiro == 0;
	}

	~SIGALRM_Handler() {
	}

};

#endif /* SIGALRM_HANDLER_H_ */
